package kr.co.fashionmai.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.web.bind.annotation.RequestParam;

import kr.co.fashionmai.dao.FabricDao;
import kr.co.fashionmai.vo.FabricHistory;
import kr.co.fashionmai.vo.FabricMain;
import kr.co.fashionmai.vo.FabricSub;

public class FabricService 
{
	private FabricDao dao;
	
	public FabricService(FabricDao dao)
	{
		this.dao = dao;
	}
	
	public List<FabricMain> main(FabricMain fabric)
	{
		return dao.main(fabric);
	}
	
	public int getTotalCount(FabricMain fabric)
	{
		return dao.getTotalCount(fabric);
	}
	
	public void insert(FabricMain fabricMain)
	{
		dao.insert(fabricMain);
	}
	
	public void insert(List<FabricSub> fabricSubList)
	{
		dao.insert(fabricSubList);
	}
	
	public void insert(FabricHistory history)
	{
		dao.insert(history);
	}
	
	public void delete(String fabric)
	{
		dao.delete(fabric);
	}
	
	public void delete(String fabric, String update)
	{
		dao.delete(fabric, update);
	}
	
	public HashMap select(String fabric)
	{
		return dao.select(fabric);
	}
	
	public void update(String fabric)
	{
		dao.update(fabric);
	}
}

